<extend name="./Application/Admin/View/Layout/application.html"/>

<block name="content">
    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">新增用户组</strong> /
                <small>Create Group</small>
            </div>
        </div>

        <div class="am-g">
            <div class="am-u-sm-12 am-u-md-12">
                <div class="am-tab-panel">
                    <form class="am-form " action="__SELF__" method="post">

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                用户组名
                            </div>
                            <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                <input type="text" class="am-input-sm" name="title" placeholder="请输入用户组名">
                            </div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                权限列表
                            </div>

                            <div class="am-u-sm-8 am-u-md-8 am-u-end col-end">

                                <volist name="menus" id="menu">

                                    <div class="am-panel am-panel-default">
                                        <div class="am-panel-hd">
                                            <label class="am-checkbox-inline">
                                                <input type="checkbox" value="{{$menu.id}}"
                                                       name="rules[]" class="permission1">
                                                <span class="am-badge am-badge-secondary am-text-sm am-radius">{{$menu.title}}</span>
                                            </label>
                                        </div>
                                        <div class="am-panel-bd">
                                            <volist name="menu.children" id="children">

                                                <div class="am-g am-margin-top">
                                                    <div class="am-u-sm-4 am-u-md-3 am-text-right p2">
                                                        <label class="am-checkbox-inline">
                                                            <input type="checkbox" value="{{$children.id}}"
                                                                   name="rules[]" class="permission2">
                                                            <span class="am-badge am-badge-success am-radius">{{$children.title}}</span>
                                                        </label>
                                                    </div>
                                                    <div class="am-u-sm-8 am-u-md-9 am-u-end col-end">

                                                        <volist name="children.child" id="c">
                                                            <label class="am-checkbox-inline">
                                                                <input type="checkbox" value="{{$c.id}}"
                                                                       name="rules[]">{{$c.title}}
                                                            </label>
                                                        </volist>

                                                    </div>
                                                </div>
                                            </volist>

                                        </div>
                                    </div>

                                </volist>
                            </div>
                        </div>

                        <div class="am-margin">
                            <button type="submit" class="am-btn am-btn-primary">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>